import https from "../../https";
import type{ NewsModel,NewsPageParm } from "./NewsModel";
export const addApi = (parm:NewsModel) =>{
    return https.post("/api/news/add",parm)
}
export const editApi = (parm:NewsModel) =>{
    return https.put("/api/news/edit",parm)
}
export const getListApi = (parm:NewsPageParm)=>{
    return https.get("/api/news/list",parm)
}
export const deleteApi = (id:string) =>{
    return https.delete(`/api/news/${id}`)
}